View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0001748 | K18X001.00 SKB SWAN | SW | public | 2023-06-20 15:30 | 2023-06-20 16:06 |
| Reporter | (ALTech) Sangmin Choi | Assigned To | (ALTech) Sangmin Choi | Due Date | 2023-06-23 16:23 |
| Priority | normal | Severity | s4-minor | Reproducibility | N/A |
| Status | closed | Resolution | fixed | ||
| Summary | 0001748: Please apply this patch from CSMSKBSBLT-211. | ||||
| Description | Hi, Jason, Please apply this patch from CSMSKBSBLT-211. You can apply them to 540 branches. 1. vendor/synaptics/vsxxx SKBSBALT-144-Set_pcm_output_when_nugu_on.patch Commit Message : storing current audio output then changing audio output format as PCM when NUGU is on. When NUGU is off, rollback audio output as stored value. 2. syna-release/ampsdk revert below commit commit 807533d5fb88d14a9a3ed770992f5fe36508626f (tag: BFX-UA300_5.3.1_2021-0825-122743, tag: BFX-UA300_5.3.1_2021-0825-122603, tag: BFX-UA300_5.3.1_2021-0825-120722, tag: BFX-UA300_5.3.1_2021-0823-122720, tag: BFX-UA300_5.3.1_2021-0823-120637, tag: BFX-UA300_5.3.1_2021-0823-100051, tag: BFX-UA300_5.3.1_2021-0819-192525, tag: BFX-UA300_5.3.1_2021-0819-192349, tag: BFX-UA300_5.3.1_2021-0813-122409, tag: BFX-UA300_5.3.1_2021-0813-121848) Author: Tony Kim <Tony.Kim@synaptics.com> Date: Wed Aug 11 23:30:30 2021 +0900 SKB-144 Nugu patch Thank you. Sangmin Choi. | ||||
| Tags | No tags attached. | ||||
| Attach Tags | |||||
|
|
SKBSBALT-144-Set_pcm_output_when_nugu_on.patch (3,079 bytes)
diff --git a/audio/audio_hw.cpp b/audio/audio_hw.cpp
index 7678423..7ecfa1f 100755
--- a/audio/audio_hw.cpp
+++ b/audio/audio_hw.cpp
@@ -83,6 +83,11 @@ struct pcm_config pcm_config_in = {
};
#endif
+/* store previous audio format for nugu_playback */
+static AMP_SND_SPDIF_FORMAT gSpdifFormat = AMP_SND_SPDIF_FORMAT_INVALID;
+static AMP_SND_HDMI_FORMAT gHdmiFormat = AMP_SND_HDMI_FORMAT_INVALID;
+
+
static uint32_t out_get_sample_rate(const struct audio_stream *stream)
{
ENTER("stream=%p", stream);
@@ -1219,6 +1224,26 @@ static int adev_set_parameters(struct audio_hw_device *dev,
gDevConStatus.nugu_playback_enabled = true;
bAudioRouteChange = true;
+ // save audio format
+ AMP_SND_GetSpdifFormat(&gSpdifFormat);
+ AMP_SND_GetHDMIFormat(&gHdmiFormat);
+
+ // set output mode as PCM or PCM multi when nugu is on
+ if(gHdmiFormat != AMP_SND_HDMI_FORMAT_PCM_MULTI) {
+ ret = AMP_SND_SetSpdifFormat(AMP_SND_SPDIF_FORMAT_STEREO_PCM);
+ if( ret != SUCCESS ) {
+ MVLOGE("fail to set AMP_SND_SetSpdifFormat() to AMP_SND_SPDIF_FORMAT_STEREO_PCM!!!");
+ } else {
+ MVLOGD("change to Spdif format to PCM.");
+ }
+ ret = AMP_SND_SetHDMIFormat(AMP_SND_HDMI_FORMAT_PCM_MULTI);
+ if( ret != SUCCESS ) {
+ MVLOGE("fail to set AMP_SND_SetHDMIFormat () to AMP_SND_HDMI_FORMAT_PCM_MULTI!!!");
+ } else {
+ MVLOGD("change to HDMI format to PCM.");
+ }
+ }
+
//Enable AMP when NUGU is playing.
isAmpOn = property_get_int32(PROPERTY_VENDOR_AMP_STATUS, 1);
if(isAmpOn == 0){ //AMP is off
@@ -1237,6 +1262,22 @@ static int adev_set_parameters(struct audio_hw_device *dev,
//Fii add end; River 2022/07/17
gDevConStatus.nugu_playback_enabled = false;
bAudioRouteChange = true;
+
+ // Change output format as saved one.
+ if(gHdmiFormat != AMP_SND_HDMI_FORMAT_INVALID) {
+ ret = AMP_SND_SetSpdifFormat(gSpdifFormat);
+ if( ret != SUCCESS ) {
+ MVLOGE("fail to set AMP_SND_SetSpdifFormat() to (%d)!!!", gSpdifFormat);
+ } else {
+ MVLOGD("change to Spdif format to (%d).", gSpdifFormat);
+ }
+ ret = AMP_SND_SetHDMIFormat(gHdmiFormat);
+ if( ret != SUCCESS ) {
+ MVLOGE("fail to set AMP_SND_SetHDMIFormat () to (%d)!!!", gHdmiFormat);
+ } else {
+ MVLOGD("change to HDMI format to (%d).", gHdmiFormat);
+ }
+ }
}
}
|
|
|
Hi Sangmin, Done, 2023-06-20 15:54:06 | jason.tf.ling@fii-.. | 41d769f1 | syna-release/ampsdk | Revert "SKB-144 Nugu patch" 2023-06-20 15:51:00 | jason.tf.ling@fii-.. | bea26dd | vendor/synaptics/vsxxx | storing current audio output then changing audio output format Thanks, Jason |
|
|
Dear Jason, Thank you! |
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2023-06-20 15:30 | (ALTech) Sangmin Choi | New Issue | |
| 2023-06-20 15:30 | (ALTech) Sangmin Choi | Status | new => assigned |
| 2023-06-20 15:30 | (ALTech) Sangmin Choi | Assigned To | => (SW) Jason Ling |
| 2023-06-20 15:30 | (ALTech) Sangmin Choi | File Added: SKBSBALT-144-Set_pcm_output_when_nugu_on.patch | |
| 2023-06-20 15:54 |
|
Assigned To | (SW) Jason Ling => (ALTech) Sangmin Choi |
| 2023-06-20 15:54 |
|
Status | assigned => resolved |
| 2023-06-20 15:54 |
|
Note Added: 0013470 | |
| 2023-06-20 16:06 | (ALTech) Sangmin Choi | Note Added: 0013471 | |
| 2023-06-20 16:06 | (ALTech) Sangmin Choi | Status | resolved => closed |
| 2023-06-20 16:06 | (ALTech) Sangmin Choi | Resolution | open => fixed |